<template>
  <div class="sponsor" id="sponsor">
    <div class="sponsor-wrapper">
        <img class="home-title" id="cooperate" src="https://static.inclusionconf.com/static/images/cooperation-title-new.png" alt="">
        <div class="sponsor-list" v-for="(item, index) in list" :key="index">
            <div class="sponsor-item" :class="ite.title && item[ind + 1] && item[ind + 1].title  ? 'sponsor-item-width' : ''" v-for="(ite, ind) in item" :key="index + 'bg' + ind">
                <p :class="ite.title ? 'has-text' : ''" v-if="isPc || (!isPc && ite.title)">{{ ite.title }}</p>
                <img :src="ite.src" alt="">
            </div>
        </div>
    </div>
  </div>
</template>

<script>

export default {
    data() {
        return {
            list: [
                [
                    {
                        "title": "Diamond Sponsor",
                        "src": 'https://static.inclusionconf.com/static/images/company1.png'
                    },
                    {
                        "title": "",
                        "src": 'https://static.inclusionconf.com/static/images/company2.png'
                    },
                ],
                [
                    {
                        "title": "Platinum Sponsor",
                        "src": 'https://static.inclusionconf.com/static/images/company3.png'
                    }
                ],
                [
                    {
                        "title": "Gold Sponsor",
                        "src": 'https://static.inclusionconf.com/static/images/company4.png'
                    },
                    {
                        "title": "Silver Sponsor",
                        "src": 'https://static.inclusionconf.com/static/images/company5.png'
                    },
                    {
                        "title": "Bronze Sponsor",
                        "src": 'https://static.inclusionconf.com/static/images/company6.png'
                    }
                ],
                [
                    {
                        "title": "战略合作媒体",
                        "src": 'https://static.inclusionconf.com/static/images/company7.png'
                    },
                    {
                        "title": "特别支持媒体",
                        "src": 'https://static.inclusionconf.com/static/images/company8.png'
                    },
                    {
                        "title": "",
                        "src": 'https://static.inclusionconf.com/static/images/company9.png'
                    },
                    {
                        "title": "",
                        "src": 'https://static.inclusionconf.com/static/images/company10.png'
                    }
                ]
            ]
        }
    },
}
</script>

<style lang="scss" scoped>
@media screen and (min-width: 768px) {
    .sponsor {
        background: url(https://static.inclusionconf.com/static/images/sponsor.png);
        background-size: 100% 100%;
        background-color: #E6F0FF;

        .sponsor-wrapper {
            max-width: 1360px;
            padding: 68px 40px 36px;
            margin: 0 auto;

            .home-title {
                margin-bottom: 40px;
            }
        }

        .sponsor-list {
            display: flex;

            .sponsor-item {
                width: calc(25% - 14px);
                margin-right: 18px;

                p {
                    font-family: AlibabaSans102Ver2, AlibabaPuHuiTi_3_65_Medium;
                    font-weight: 600;
                    font-size: 24px;
                    color: #181818;
                    line-height: 24px;
                    text-align: left;
                    font-style: normal;
                    margin-bottom: 31px;
                    height: 24px;
                    white-space: nowrap;
                    font-weight: normal;
                    position: relative;

                    &.has-text::before {
                        content: "";
                        position: absolute;
                        left: 0;
                        bottom: -9px;
                        width: 60px;
                        height: 3px;
                        background: #1650FF;
                        border-radius: 2px;
                        opacity: 0.5;
                    }
                }

                img {
                    width: 100%;
                    height: auto;
                    margin-bottom: 44px;
                    border-radius: 12px;
                    border: 1px solid rgba(22,80,255,0.1);
                    object-fit: contain;
                }
            }
        }
    }
}
@media screen and (max-width: 1470px) and (min-width: 768px) {
    .sponsor {
        background: url(https://static.inclusionconf.com/static/images/sponsor.png);
        background-size: 100% 100%;
        background-color: #E6F0FF;

        .sponsor-wrapper {
            max-width: 1360px;
            padding: 68px 40px 80px;
            margin: 0 auto;
        }

        .sponsor-list {
            display: flex;

            .sponsor-item {
                width: calc(25% - 14px);
                margin-right: 18px;

                p {
                    font-family: AlibabaSans102Ver2, AlibabaPuHuiTi_3_65_Medium;
                    font-weight: 500;
                    font-size: 20px;
                    color: #181818;
                    line-height: 20px;
                    text-align: left;
                    font-style: normal;
                    margin-bottom: 25px;
                    height: 20px;
                    white-space: nowrap;
                }

                img {
                    width: 100%;
                    height: auto;
                    margin-bottom: 44px;
                    border-radius: 12px;
                    border: 1px solid rgba(22,80,255,0.1);
                    object-fit: contain;
                }
            }
        }
    }
}
@media screen and (max-width: 767px) {
    .sponsor {
        background: url(https://static.inclusionconf.com/static/images/sponsor.png);
        background-size: 100% 100%;
        background-color: #E6F0FF;

        .sponsor-wrapper {
            width: 100%;
            padding: 32px 18px 30px;
            margin: 0 auto;
        }

        .sponsor-list {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            margin-bottom: .18rem;

            .sponsor-item {
                width: 3.3rem;
                display: flex;
                flex-direction: column;
                justify-content: flex-end;

                &.sponsor-item-width {
                    width: 100%;
                    margin-bottom: .18rem;
                }

                p {
                    font-family: AlibabaSans102Ver2, AlibabaPuHuiTi_3_65_Medium;
                    font-weight: 500;
                    font-size: 15px;
                    color: #181818;
                    line-height: 15px;
                    text-align: left;
                    font-style: normal;
                    margin-bottom: 14px;
                    height: 15px;
                }

                img {
                    width: 3.3rem;
                    height: 1.32rem;
                    margin-bottom: .18rem;
                    border-radius: 6px;
                    border: 1px solid rgba(22,80,255,0.1);
                    object-fit: contain;
                }
            }
        }
    }
}
</style>
